package com.lumlord.common.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.lumlord.common.annotation.mybatis.SqlInjection;
import com.lumlord.common.annotation.mybatis.SqlInjectionType;
import com.lumlord.common.annotation.pojo.IgnoreColumn;
import com.lumlord.common.annotation.pojo.PK;
import com.lumlord.common.annotation.pojo.Table;

import java.io.Serializable;
import com.lumlord.common.base.BaseEntity;

import java.lang.Integer;
import java.util.ArrayList;
import java.util.List;

/**
 * 系统菜单权限表 MenuPermission
 * 
 * @author gpf_自动生成
 * @email 372138617@qq.com
 * @date 2019-10-18 14:25:38
 */
@Table(value="t_action",DB="yw_security_server")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class LumlordApi extends BaseEntity implements Serializable {
	@IgnoreColumn
	private static final long serialVersionUID = 1L;

	/** 主键ID，自增 **/
	@PK("id")
	private Integer id;
	
	/** 访问来源 0 PC， 1 APP   **/
	private Integer visit;
	
	/**
	 * 父級名稱
	 */
	private String prentModeName;
	
	/** 父节点主键ID（当前表关联的主键） **/
	//@JsonIgnore//前端权限不需要返回，忽略此字段
	private Integer parantId;

	/** 菜单URL地址 **/
	private String menuUrl;

	/** 排序（数字大的靠前） **/
	private Integer orderNum;

	/** vue标识编码。非API 显示PAGE **/
	private String vueCode;

	/** 标记 **/
	private String remark;

	/** 设计者 **/
	private String designer;

	/** 所属class **/
	@JsonIgnore//前端权限不需要返回，忽略此字段
	private String clazz;

	/** 服务名称 **/
	private String serverName;

	/** 方法名称 **/
	private String methodName;

	/** 模块名称 **/
	private String modeName;

	/** api接口，权限路径 **/
	private String action;


	/** 菜单图片URL（存储在前端） */
	private String menuIconUrl;
	
	/**启用状态（0启用/默认；1未启用）**/
	@SqlInjection(types = { SqlInjectionType.INSERT, SqlInjectionType.DEL, SqlInjectionType.QUERY,SqlInjectionType.UPDATE }, defval = "0")
	private Integer status;
	
	/**权限树**/
	@IgnoreColumn
	private List<LumlordApi> actions = new ArrayList<LumlordApi>();
	
	/**
	 * 编码
	 */
	private String menuCode;
	
	/**
	 *   权限类型 1 一级菜单、 2 二级菜单、 3三级菜单、 4 按钮或者 5 字段
	 */
	private Integer actionType;
	
	/**
	 * 屬性映射 上级菜单
	 */
	@IgnoreColumn
	private String parantModeName;
	/**
	 * 屬性映射 用戶名
	 */
	@IgnoreColumn
	private String userName;
	 
	
	public String getMenuCode() {
		return menuCode;
	}

	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	}

	
	public String getMenuIconUrl() {
		return menuIconUrl;
	}

	public void setMenuIconUrl(String menuIconUrl) {
		this.menuIconUrl = menuIconUrl;
	}

	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}


	public Integer getParantId() {
		return parantId;
	}

	public void setParantId(Integer parantId) {
		this.parantId = parantId;
	}

	public String getMenuUrl() {
		return menuUrl;
	}

	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl;
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public String getVueCode() {
		return vueCode;
	}

	public void setVueCode(String vueCode) {
		this.vueCode = vueCode;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getDesigner() {
		return designer;
	}

	public void setDesigner(String designer) {
		this.designer = designer;
	}

	public String getClazz() {
		return clazz;
	}

	public void setClazz(String clazz) {
		this.clazz = clazz;
	}

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getModeName() {
		return modeName;
	}

	public String getParantModeName() {
		return parantModeName;
	}

	public void setParantModeName(String parantModeName) {
		this.parantModeName = parantModeName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setModeName(String modeName) {
		this.modeName = modeName;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public List<LumlordApi> getActions() {
		return actions;
	}

	public void setActions(List<LumlordApi> actions) {
		this.actions = actions;
	}

	public Integer getActionType() {
		return actionType;
	}

	public void setActionType(Integer actionType) {
		this.actionType = actionType;
	}

	public String getPrentModeName() {
		return prentModeName;
	}

	public void setPrentModeName(String prentModeName) {
		this.prentModeName = prentModeName;
	}

	public Integer getVisit() {
		return visit;
	}

	public void setVisit(Integer visit) {
		this.visit = visit;
	}

	public LumlordApi() {
		super();
	}

}